const system = require('./system.js');
const route = require('./route.js');
const user = require('./user.js');
var isGoing = false;
module.exports = {
  ...system,
  ...route,
  ...user,

  isEmpty(value) {
    const isEmpty = require('lodash/isEmpty');
    return isEmpty(value);
  },
  isString(value) {
    return typeof value == 'string'
  },
  previewPhotos(photos, index = 0) {
    return uni.previewImage({
      current: index,
      urls: (Array.isArray(photos) ? photos : [photos]).map(photo => typeof photo == 'string' ? photo : (photo
        ?.image || photo?.img))
    })
  },
  toSimplified(value) {
    const numbers = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
    return numbers[value]
  }
}
